package principle.factory.factoryClass;

import principle.factory.simple.cheesePizza;
import principle.factory.simple.greekPizza;
import principle.factory.simple.pizza;

/**
 * @author malguy-wang sir
 * @create ${year}-${month}-${day}-${time}
 */
public class simpleFactory {
    public pizza createPizza(String orderType){
        pizza pizza = null;
        if (orderType.equals("cheese")) pizza = new cheesePizza();
        else if (orderType.equals("greek")) pizza = new greekPizza();
        return pizza;
    }
}
